Fix compile errors with NO_STD_FUNCTIONS 
diff --git a/ChangeLog b/ChangeLog index 2582c9a..aa02b59 100644 --- a/ChangeLog +++ b/ChangeLog 
@@ -35,6 +35,7 @@  errors on use of deprecated functions.    Bugfix + * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS.  * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara).  * Fix bug in entropy.c when THREADING_C is also enabled that caused  entropy_free() to crash (thanks to Rafał Przywara). 
diff --git a/include/polarssl/platform.h b/include/polarssl/platform.h index 9095203..639b180 100644 --- a/include/polarssl/platform.h +++ b/include/polarssl/platform.h 
@@ -85,6 +85,8 @@  #define polarssl_free POLARSSL_PLATFORM_FREE_MACRO  #define polarssl_malloc POLARSSL_PLATFORM_MALLOC_MACRO  #else +/* For size_t */ +#include <stddef.h>  extern void * (*polarssl_malloc)( size_t len );  extern void (*polarssl_free)( void *ptr );   @@ -108,6 +110,8 @@  * The function pointers for fprintf  */  #if defined(POLARSSL_PLATFORM_FPRINTF_ALT) +/* We need FILE * */ +#include <stdio.h>  extern int (*polarssl_fprintf)( FILE *stream, const char *format, ... );    /** 
diff --git a/library/platform.c b/library/platform.c index 96f2a9d..a36dc62 100644 --- a/library/platform.c +++ b/library/platform.c 
@@ -72,7 +72,7 @@  {  ((void) s);  ((void) n); - ((void) format) + ((void) format);  return( 0 );  }   @@ -148,7 +148,6 @@  static void platform_exit_uninit( int status )  {  ((void) status); - return( 0 );  }    #define POLARSSL_PLATFORM_STD_EXIT platform_exit_uninit 
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index c083924..41993d9 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh 
@@ -146,6 +146,14 @@  scripts/config.pl unset POLARSSL_FS_IO  CC=gcc CFLAGS='-Werror -O0' make   +# catch compile bugs in _uninit functions +msg "build: full config with NO_STD_FUNCTION, make, gcc" # ~ 30s +cleanup +cp "$CONFIG_H" "$CONFIG_BAK" +scripts/config.pl full +scripts/config.pl set POLARSSL_PLATFORM_NO_STD_FUNCTIONS +CC=gcc CFLAGS='-Werror -O0' make +  if uname -a | grep -F x86_64 >/dev/null; then  msg "build: i386, make, gcc" # ~ 30s  cleanup